Skip to content

feat: add CatalogProviderList support#1363

Open
timsaucer wants to merge 3 commits intoapache:mainfrom
timsaucer:feat/catalog-provider-list
Open

feat: add CatalogProviderList support#1363
timsaucer wants to merge 3 commits intoapache:mainfrom
timsaucer:feat/catalog-provider-list

Conversation

@timsaucer
Copy link
Member

Which issue does this PR close?

Follow on to #1156

Rationale for this change

We currently support the following kinds of providers: Catalog, Schema, and Table. There is one more in the heirarchy, CatalogProviderList. This adds the missing support.

What changes are included in this PR?

Following the same patterns as in CatalogProvider (and others) this adds support for Python and Rust based CatalogProviderList. It adds the option to register a new provider list with the session context.

Are there any user-facing changes?

New addition only.

@timsaucer timsaucer marked this pull request as draft February 3, 2026 13:55
@timsaucer timsaucer marked this pull request as ready for review February 3, 2026 15:55
Copy link
Contributor

@nuno-faria nuno-faria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

...

@abstractmethod
def catalog(self, name: str) -> Catalog | None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the return type here be CatalogProvider?

...

def register_catalog( # noqa: B027
self, name: str, catalog: CatalogProviderExportable | CatalogProvider | Catalog
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also is the Catalog type here correct?


class CustomCatalogProviderList(dfn.catalog.CatalogProviderList):
def __init__(self):
self.catalogs = {"my_catalog": CustomCatalogProvider()}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this could have an additional catalog just to show it supports multiple ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants